package com.hu.bgp.client.localevent;

import com.google.gwt.event.shared.GwtEvent;
import com.hu.bgp.client.place.Place;

public class PlaceChangedEvent extends GwtEvent<PlaceChangedEventHandler>
{
	public static Type<PlaceChangedEventHandler> TYPE = new Type<PlaceChangedEventHandler>();
	
	private Place place;
	
	public PlaceChangedEvent(Place place)
	{
		this.place = place;
	}
	
	public Place getPlace()
	{
		return place;
	}
	
	@Override
	public Type<PlaceChangedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(PlaceChangedEventHandler handler) {
		handler.changePlaceTo(place);

	}

}
